package com.example.demo;

/**
 * @author gxing
 * @desc TODO
 * @date 2024/4/2
 */
public enum WeChatErrorCodeEnum {

    invalid_credential("40001", "invalid credential", "不合法的调用凭证"),
    invalid_grant_type("40002", "invalid grant_type", "不合法的grant_type"),
    invalid_openid("40003", "invalid openid", "不合法的OpenID"),
    invalid_media_type("40004", "invalid media type", "不合法的媒体文件类型"),
    invalid_media_id("40007", "invalid media_id", "不合法的media_id"),
    invalid_message_type("40008", "invalid message type", "不合法的message_type"),
    invalid_image_size("40009", "invalid image size", "不合法的图片大小"),
    invalid_voice_size("40010", "invalid voice size", "不合法的语音大小"),
    invalid_video_size("40011", "invalid video size", "不合法的视频大小"),
    invalid_thumb_size("40012", "invalid thumb size", "不合法的缩略图大小"),
    invalid_appid("40013", "invalid appid", "不合法的AppID"),
    invalid_access_token("40014", "invalid access_token", "不合法的access_token"),
    invalid_menu_type("40015", "invalid menu type", "不合法的菜单类型"),
    invalid_button_size("40016", "invalid button size", "不合法的菜单按钮个数"),
    invalid_button_type("40017", "invalid button type", "不合法的按钮类型"),
    invalid_button_name_size("40018", "invalid button name size", "不合法的按钮名称长度"),
    invalid_button_key_size("40019", "invalid button key size", "不合法的按钮KEY长度"),
    invalid_button_url_size("40020", "invalid button url size", "不合法的url长度"),
    invalid_sub_button_size("40023", "invalid sub button size", "不合法的子菜单按钮个数"),
    invalid_sub_button_type("40024", "invalid sub button type", "不合法的子菜单类型"),
    invalid_sub_button_name_size("40025", "invalid sub button name size", "不合法的子菜单按钮名称长度"),
    invalid_sub_button_key_size("40026", "invalid sub button key size", "不合法的子菜单按钮KEY长度"),
    invalid_sub_button_url_size("40027", "invalid sub button url size", "不合法的子菜单按钮url长度"),
    invalid_code("40029", "invalid code", "不合法或已过期的code"),
    invalid_refresh_token("40030", "invalid refresh_token", "不合法的refresh_token"),
    invalid_template_id_size("40036", "invalid template_id size", "不合法的template_id长度"),
    invalid_template_id("40037", "invalid template_id", "不合法的template_id"),
    invalid_url_size("40039", "invalid url size", "不合法的url长度"),
    invalid_url_domain("40048", "invalid url domain", "不合法的url域名"),
    invalid_sub_button_url_domain("40054", "invalid sub button url domain", "不合法的子菜单按钮url域名"),
    invalid_button_url_domain("40055", "invalid button url domain", "不合法的菜单按钮url域名"),
    invalid_url("40066", "invalid url", "不合法的url"),
    access_token_missing("41001", "access_token missing", "缺失access_token参数"),
    appid_missing("41002", "appid missing", "缺失appid参数"),
    refresh_token_missing("41003", "refresh_token missing", "缺失refresh_token参数"),
    appsecret_missing("41004", "appsecret missing", "缺失secret参数"),
    media_data_missing("41005", "media data missing", "缺失二进制媒体文件"),
    media_id_missing("41006", "media_id missing", "缺失media_id参数"),
    sub_menu_data_missing("41007", "sub_menu data missing", "缺失子菜单数据"),
    missing_code("41008", "missing code", "缺失code参数"),
    missing_openid("41009", "missing openid", "缺失openid参数"),
    missing_url("41010", "missing url", "缺失url参数"),
    access_token_expired("42001", "access_token expired", "access_token超时"),
    refresh_token_expired("42002", "refresh_token expired", "refresh_token超时"),
    code_expired("42003", "code expired", "code超时"),
    require_GET_method("43001", "require GET method", "需要使用GET方法请求"),
    require_POST_method("43002", "require POST method", "需要使用POST方法请求"),
    require_https("43003", "require https", "需要使用HTTPS"),
    require_subscribe("43004", "require subscribe", "需要订阅关系"),
    empty_media_data("44001", "empty media data", "空白的二进制数据"),
    empty_post_data("44002", "empty post data", "空白的POST数据"),
    empty_news_data("44003", "empty news data", "空白的news数据"),
    empty_content("44004", "empty content", "空白的内容"),
    empty_list_size("44005", "empty list size", "空白的列表"),
    media_size_out_of_limit("45001", "media size out of limit", "二进制文件超过限制"),
    content_size_out_of_limit("45002", "content size out of limit", "content参数超过限制"),
    title_size_out_of_limit("45003", "title size out of limit", "title参数超过限制"),
    description_size_out_of_limit("45004", "description size out of limit", "description参数超过限制"),
    url_size_out_of_limit("45005", "url size out of limit", "url参数长度超过限制"),
    picurl_size_out_of_limit("45006", "picurl size out of limit", "picurl参数超过限制"),
    playtime_out_of_limit("45007", "playtime out of limit", "播放时间超过限制（语音为60s最大）"),
    article_size_out_of_limit("45008", "article size out of limit", "article参数超过限制"),
    api_freq_out_of_limit("45009", "api freq out of limit", "接口调动频率超过限制"),
    create_menu_limit("45010", "create menu limit", "建立菜单被限制"),
    api_limit("45011", "api limit", "频率限制"),
    template_size_out_of_limit("45012", "template size out of limit", "模板大小超过限制"),
    cant_modify_sys_group("45016", "can't modify sys group", "不能修改默认组"),
    cant_set_group_name_too_long_sys_group("45017", "can't set group name too long sys group", "修改组名过长"),
    too_many_group_now_no_need_to_add_new("45018", "too many group now, no need to add new", "组数量过多"),
    api_unauthorized("50001", "api unauthorized", "接口未授权"),
    ;

    private String errcode;
    private String errmsg;
    private String desc;

    WeChatErrorCodeEnum(String errcode, String errmsg, String desc) {
        this.errcode = errcode;
        this.errmsg = errmsg;
        this.desc = desc;
    }
}
